# One annual plan per de jure kingdom, plus the separate Iceland district.
# Province effects only apply the stored seasonal result; they never roll weather.
# The controller calls the map pass at calendar boundaries and during recovery.

cr_clear_regional_weather_effect = {
	clr_province_flag = cr_weather_applied
	remove_province_modifier = cr_weather_atlantic_rains
	remove_province_modifier = cr_weather_atlantic_storms
	remove_province_modifier = cr_weather_atlantic_mists
	remove_province_modifier = cr_weather_atlantic_bright_season
	remove_province_modifier = cr_weather_scottish_rains
	remove_province_modifier = cr_weather_scottish_gales
	remove_province_modifier = cr_weather_scottish_cold
	remove_province_modifier = cr_weather_scottish_clear_season
	remove_province_modifier = cr_weather_iceland_hard_winter
	remove_province_modifier = cr_weather_iceland_gales
	remove_province_modifier = cr_weather_iceland_thaw
	remove_province_modifier = cr_weather_iceland_clear_season
	remove_province_modifier = cr_weather_northern_maritime_rains
	remove_province_modifier = cr_weather_northern_maritime_gales
	remove_province_modifier = cr_weather_northern_maritime_cold
	remove_province_modifier = cr_weather_northern_maritime_bright_season
	remove_province_modifier = cr_weather_boreal_snow
	remove_province_modifier = cr_weather_boreal_rains
	remove_province_modifier = cr_weather_boreal_thaw
	remove_province_modifier = cr_weather_boreal_clear_season
	remove_province_modifier = cr_weather_temperate_rains
	remove_province_modifier = cr_weather_temperate_storms
	remove_province_modifier = cr_weather_temperate_cold_snap
	remove_province_modifier = cr_weather_temperate_fair_season
	remove_province_modifier = cr_weather_mediterranean_summer_heat
	remove_province_modifier = cr_weather_mediterranean_winter_rains
	remove_province_modifier = cr_weather_mediterranean_storms
	remove_province_modifier = cr_weather_mediterranean_fair_season
	remove_province_modifier = cr_weather_iberian_dry_heat
	remove_province_modifier = cr_weather_iberian_rains
	remove_province_modifier = cr_weather_iberian_drought
	remove_province_modifier = cr_weather_iberian_good_season
	remove_province_modifier = cr_weather_highland_snow
	remove_province_modifier = cr_weather_highland_storms
	remove_province_modifier = cr_weather_highland_dry_season
	remove_province_modifier = cr_weather_highland_clear_season
	remove_province_modifier = cr_weather_desert_heat
	remove_province_modifier = cr_weather_desert_sandstorms
	remove_province_modifier = cr_weather_desert_rains
	remove_province_modifier = cr_weather_desert_clear_season
	remove_province_modifier = cr_weather_sahel_wet_season
	remove_province_modifier = cr_weather_sahel_dry_season
	remove_province_modifier = cr_weather_sahel_drought
	remove_province_modifier = cr_weather_sahel_good_season
	remove_province_modifier = cr_weather_steppe_winds
	remove_province_modifier = cr_weather_steppe_snow
	remove_province_modifier = cr_weather_steppe_drought
	remove_province_modifier = cr_weather_steppe_grazing_season
	remove_province_modifier = cr_weather_plateau_dry_heat
	remove_province_modifier = cr_weather_plateau_winter
	remove_province_modifier = cr_weather_plateau_spring
	remove_province_modifier = cr_weather_plateau_dust
	remove_province_modifier = cr_weather_indian_monsoon
	remove_province_modifier = cr_weather_indian_floods
	remove_province_modifier = cr_weather_indian_dry_heat
	remove_province_modifier = cr_weather_indian_good_harvest
	remove_province_modifier = cr_weather_himalayan_snow
	remove_province_modifier = cr_weather_himalayan_monsoon
	remove_province_modifier = cr_weather_himalayan_clear_season
	remove_province_modifier = cr_weather_himalayan_cold
	remove_province_modifier = cr_weather_east_asian_monsoon
	remove_province_modifier = cr_weather_east_asian_storms
	remove_province_modifier = cr_weather_east_asian_winter
	remove_province_modifier = cr_weather_east_asian_clear_season
}

# Title scope. Generic set_flag also permits the controller's orphan-land fallback.
cr_mark_weather_plan_effect = {
	set_flag = cr_weather_plan_ready
}

cr_prepare_kingdom_weather_effect = {
	if = {
		limit = { NOT = { has_flag = cr_weather_plan_ready } }
		cr_roll_kingdom_weather_effect = yes
		cr_mark_weather_plan_effect = yes
	}
}

cr_roll_kingdom_weather_effect = {
	if = {
		limit = { cr_weather_is_iceland_trigger = yes }
		cr_apply_iceland_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_atlantic_isles_trigger = yes }
		cr_apply_atlantic_isles_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_scotland_trigger = yes }
		cr_apply_scotland_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_northern_maritime_trigger = yes }
		cr_apply_northern_maritime_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_boreal_trigger = yes }
		cr_apply_boreal_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_western_oceanic_trigger = yes }
		cr_apply_western_oceanic_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_central_temperate_trigger = yes }
		cr_apply_temperate_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_alpine_balkan_trigger = yes }
		cr_apply_highland_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_mediterranean_trigger = yes }
		cr_apply_mediterranean_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_iberian_trigger = yes }
		cr_apply_iberian_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_anatolian_caucasus_trigger = yes }
		cr_apply_highland_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_levant_desert_trigger = yes }
		cr_apply_desert_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_sahel_africa_trigger = yes }
		cr_apply_sahel_africa_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_steppe_trigger = yes }
		cr_apply_steppe_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_persian_plateau_trigger = yes }
		cr_apply_persian_plateau_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_indian_monsoon_trigger = yes }
		cr_apply_indian_monsoon_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_himalayan_tibetan_trigger = yes }
		cr_apply_himalayan_tibetan_weather_effect = yes
	}
	else_if = {
		limit = { cr_weather_is_east_asian_trigger = yes }
		cr_apply_east_asian_weather_effect = yes
	}
	else = {
		cr_apply_temperate_weather_effect = yes
	}
}

# Title/province scope: choose an already-stored outcome for the calendar season.
cr_select_weather_season_effect = {
	if = {
		limit = { has_global_flag = cr_weather_season_winter }
		set_variable = { which = cr_weather_current which = cr_weather_winter }
	}
	else_if = {
		limit = { has_global_flag = cr_weather_season_spring }
		set_variable = { which = cr_weather_current which = cr_weather_spring }
	}
	else_if = {
		limit = { has_global_flag = cr_weather_season_summer }
		set_variable = { which = cr_weather_current which = cr_weather_summer }
	}
	else_if = {
		limit = { has_global_flag = cr_weather_season_autumn }
		set_variable = { which = cr_weather_current which = cr_weather_autumn }
	}
}

# Scheduler province scope. Direct province-to-kingdom scope reaches uncreated
# de jure kingdoms without walking every county's liege-title chain.
cr_prepare_territorial_weather_plans_effect = {
	any_province = {
		limit = {
			has_owner = yes
			kingdom = { always = yes }
		}
		kingdom = { cr_prepare_kingdom_weather_effect = yes }
	}
	d_iceland = { cr_prepare_kingdom_weather_effect = yes }
}

# Scheduler province scope. Each settled province reads its de jure kingdom directly.
# A global dispatch variable carries the selected title value back into province
# scope because CK2 does not reliably copy title variables through event targets.
# Iceland uses its duchy plan, while land without a kingdom uses one shared
# temperate fallback stored on the controller province.
cr_apply_territorial_weather_effect = {
	if = {
		limit = { NOT = { has_flag = cr_weather_plan_ready } }
		cr_apply_temperate_weather_effect = yes
		cr_mark_weather_plan_effect = yes
	}
	any_province = {
		limit = {
			has_owner = yes
			num_of_settlements >= 1
		}
		set_variable = { which = global_cr_weather_dispatch_current value = 0 }
		if = {
			limit = { county = { de_jure_liege_or_above = d_iceland } }
			d_iceland = {
				cr_prepare_kingdom_weather_effect = yes
				cr_select_weather_season_effect = yes
				set_variable = { which = global_cr_weather_dispatch_current which = cr_weather_current }
			}
		}
		else_if = {
			limit = { kingdom = { always = yes } }
			kingdom = {
				cr_prepare_kingdom_weather_effect = yes
				cr_select_weather_season_effect = yes
				set_variable = { which = global_cr_weather_dispatch_current which = cr_weather_current }
			}
		}
		else_if = {
			# Amalfi and other de jure duchies without a kingdom need a stable
			# territorial plan of their own rather than the scheduler province.
			limit = { duchy = { always = yes } }
			duchy = {
				cr_prepare_kingdom_weather_effect = yes
				cr_select_weather_season_effect = yes
				set_variable = { which = global_cr_weather_dispatch_current which = cr_weather_current }
			}
		}
		else = {
			ROOT = {
				cr_select_weather_season_effect = yes
				set_variable = { which = global_cr_weather_dispatch_current which = cr_weather_current }
			}
		}

		# Defensive fallback: if a special title scope failed to return a valid
		# seasonal result, use the scheduler province's shared temperate plan.
		# This prevents a legitimate settled province from failing verification.
		if = {
			limit = { NOT = { check_variable = { which = global_cr_weather_dispatch_current value = 1 } } }
			ROOT = {
				cr_select_weather_season_effect = yes
				set_variable = { which = global_cr_weather_dispatch_current which = cr_weather_current }
			}
		}
		cr_apply_selected_weather_effect = yes
	}
	set_variable = { which = global_cr_weather_dispatch_current value = 0 }
}

# Scheduler province scope. This annual pass invalidates regional plans before
# December rolls the next four-season year.
cr_clear_territorial_weather_plans_effect = {
	any_province = {
		limit = {
			has_owner = yes
			kingdom = { always = yes }
		}
		kingdom = { clr_flag = cr_weather_plan_ready }
	}
	d_iceland = { clr_flag = cr_weather_plan_ready }
	clr_flag = cr_weather_plan_ready
}

# Scheduler province scope. One world pass applies the selected season directly.
cr_update_world_weather_effect = {
	clr_global_flag = cr_weather_distribution_v6_verified
	clr_global_flag = cr_weather_distribution_v7_verified
	cr_apply_territorial_weather_effect = yes
	# The seasonal distributor is a single deterministic world pass. The old
	# all-province verifier was brittle on special/titular geography (notably
	# Amalfi) and could leave cr_weather_refresh stuck even after a completed pass.
	# Completion is therefore recorded when the distributor returns.
	set_global_flag = cr_weather_distribution_v7_verified
	clr_global_flag = cr_weather_refresh
	# Character-sheet markers mirror capital weather without duplicating its effects.
	if = {
		limit = { has_global_flag = cr_weather_distribution_v7_verified }
		any_playable_ruler = {
			limit = {
				is_ruler = yes
				capital_scope = { has_owner = yes }
			}
			cr_refresh_character_weather_effect = yes
		}
		# December and the following January/February share one chronicle season.
		set_variable = { which = global_cr_weather_chronicle_period which = global_cr_weather_year }
		multiply_variable = { which = global_cr_weather_chronicle_period value = 4 }
		if = {
			limit = { has_global_flag = cr_weather_season_spring }
			change_variable = { which = global_cr_weather_chronicle_period value = 1 }
		}
		else_if = {
			limit = { has_global_flag = cr_weather_season_summer }
			change_variable = { which = global_cr_weather_chronicle_period value = 2 }
		}
		else_if = {
			limit = { has_global_flag = cr_weather_season_autumn }
			change_variable = { which = global_cr_weather_chronicle_period value = 3 }
		}
		# A character event makes ROOT the reader, not the province running the clock.
		any_player = {
			limit = { ai = no is_ruler = yes }
			character_event = { id = cr_weather.20 }
		}
	}

	# cr_weather_applied is a transient verification marker. Never leave it in the
	# save after a completed world pass, whether verification succeeded or failed.
	any_province = {
		limit = { has_province_flag = cr_weather_applied }
		clr_province_flag = cr_weather_applied
	}
}

# Province scope. Replaced at the season boundary; 93 days is a fail-safe expiry.
cr_apply_selected_weather_effect = {
	cr_clear_regional_weather_effect = yes
	if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 1 } }
		add_province_modifier = { name = cr_weather_atlantic_rains duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 2 } }
		add_province_modifier = { name = cr_weather_atlantic_storms duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 3 } }
		add_province_modifier = { name = cr_weather_atlantic_mists duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 4 } }
		add_province_modifier = { name = cr_weather_atlantic_bright_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 5 } }
		add_province_modifier = { name = cr_weather_scottish_rains duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 6 } }
		add_province_modifier = { name = cr_weather_scottish_gales duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 7 } }
		add_province_modifier = { name = cr_weather_scottish_cold duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 8 } }
		add_province_modifier = { name = cr_weather_scottish_clear_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 9 } }
		add_province_modifier = { name = cr_weather_iceland_hard_winter duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 10 } }
		add_province_modifier = { name = cr_weather_iceland_gales duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 11 } }
		add_province_modifier = { name = cr_weather_iceland_thaw duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 12 } }
		add_province_modifier = { name = cr_weather_iceland_clear_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 13 } }
		add_province_modifier = { name = cr_weather_northern_maritime_rains duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 14 } }
		add_province_modifier = { name = cr_weather_northern_maritime_gales duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 15 } }
		add_province_modifier = { name = cr_weather_northern_maritime_cold duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 16 } }
		add_province_modifier = { name = cr_weather_northern_maritime_bright_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 17 } }
		add_province_modifier = { name = cr_weather_boreal_snow duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 18 } }
		add_province_modifier = { name = cr_weather_boreal_rains duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 19 } }
		add_province_modifier = { name = cr_weather_boreal_thaw duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 20 } }
		add_province_modifier = { name = cr_weather_boreal_clear_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 21 } }
		add_province_modifier = { name = cr_weather_temperate_rains duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 22 } }
		add_province_modifier = { name = cr_weather_temperate_storms duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 23 } }
		add_province_modifier = { name = cr_weather_temperate_cold_snap duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 24 } }
		add_province_modifier = { name = cr_weather_temperate_fair_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 25 } }
		add_province_modifier = { name = cr_weather_mediterranean_summer_heat duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 26 } }
		add_province_modifier = { name = cr_weather_mediterranean_winter_rains duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 27 } }
		add_province_modifier = { name = cr_weather_mediterranean_storms duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 28 } }
		add_province_modifier = { name = cr_weather_mediterranean_fair_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 29 } }
		add_province_modifier = { name = cr_weather_iberian_dry_heat duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 30 } }
		add_province_modifier = { name = cr_weather_iberian_rains duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 31 } }
		add_province_modifier = { name = cr_weather_iberian_drought duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 32 } }
		add_province_modifier = { name = cr_weather_iberian_good_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 33 } }
		add_province_modifier = { name = cr_weather_highland_snow duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 34 } }
		add_province_modifier = { name = cr_weather_highland_storms duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 35 } }
		add_province_modifier = { name = cr_weather_highland_dry_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 36 } }
		add_province_modifier = { name = cr_weather_highland_clear_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 37 } }
		add_province_modifier = { name = cr_weather_desert_heat duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 38 } }
		add_province_modifier = { name = cr_weather_desert_sandstorms duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 39 } }
		add_province_modifier = { name = cr_weather_desert_rains duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 40 } }
		add_province_modifier = { name = cr_weather_desert_clear_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 41 } }
		add_province_modifier = { name = cr_weather_sahel_wet_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 42 } }
		add_province_modifier = { name = cr_weather_sahel_dry_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 43 } }
		add_province_modifier = { name = cr_weather_sahel_drought duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 44 } }
		add_province_modifier = { name = cr_weather_sahel_good_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 45 } }
		add_province_modifier = { name = cr_weather_steppe_winds duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 46 } }
		add_province_modifier = { name = cr_weather_steppe_snow duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 47 } }
		add_province_modifier = { name = cr_weather_steppe_drought duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 48 } }
		add_province_modifier = { name = cr_weather_steppe_grazing_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 49 } }
		add_province_modifier = { name = cr_weather_plateau_dry_heat duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 50 } }
		add_province_modifier = { name = cr_weather_plateau_winter duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 51 } }
		add_province_modifier = { name = cr_weather_plateau_spring duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 52 } }
		add_province_modifier = { name = cr_weather_plateau_dust duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 53 } }
		add_province_modifier = { name = cr_weather_indian_monsoon duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 54 } }
		add_province_modifier = { name = cr_weather_indian_floods duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 55 } }
		add_province_modifier = { name = cr_weather_indian_dry_heat duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 56 } }
		add_province_modifier = { name = cr_weather_indian_good_harvest duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 57 } }
		add_province_modifier = { name = cr_weather_himalayan_snow duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 58 } }
		add_province_modifier = { name = cr_weather_himalayan_monsoon duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 59 } }
		add_province_modifier = { name = cr_weather_himalayan_clear_season duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 60 } }
		add_province_modifier = { name = cr_weather_himalayan_cold duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 61 } }
		add_province_modifier = { name = cr_weather_east_asian_monsoon duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 62 } }
		add_province_modifier = { name = cr_weather_east_asian_storms duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 63 } }
		add_province_modifier = { name = cr_weather_east_asian_winter duration = 93 }
	}
	else_if = {
		limit = { is_variable_equal = { which = global_cr_weather_dispatch_current value = 64 } }
		add_province_modifier = { name = cr_weather_east_asian_clear_season duration = 93 }
	}
	if = {
		limit = {
			check_variable = { which = global_cr_weather_dispatch_current value = 1 }
			NOT = { check_variable = { which = global_cr_weather_dispatch_current value = 65 } }
		}
		set_province_flag = cr_weather_applied
	}
}

# Annual regional profiles, in winter / spring / summer / autumn order.

cr_apply_atlantic_isles_weather_effect = {
	random_list = {
		35 = { # Wet
			set_variable = { which = cr_weather_winter value = 1 } # cr_weather_atlantic_rains
			set_variable = { which = cr_weather_spring value = 1 } # cr_weather_atlantic_rains
			set_variable = { which = cr_weather_summer value = 4 } # cr_weather_atlantic_bright_season
			set_variable = { which = cr_weather_autumn value = 1 } # cr_weather_atlantic_rains
		}
		15 = { # Stormy
			set_variable = { which = cr_weather_winter value = 2 } # cr_weather_atlantic_storms
			set_variable = { which = cr_weather_spring value = 1 } # cr_weather_atlantic_rains
			set_variable = { which = cr_weather_summer value = 2 } # cr_weather_atlantic_storms
			set_variable = { which = cr_weather_autumn value = 3 } # cr_weather_atlantic_mists
		}
		20 = { # Misty
			set_variable = { which = cr_weather_winter value = 3 } # cr_weather_atlantic_mists
			set_variable = { which = cr_weather_spring value = 3 } # cr_weather_atlantic_mists
			set_variable = { which = cr_weather_summer value = 4 } # cr_weather_atlantic_bright_season
			set_variable = { which = cr_weather_autumn value = 3 } # cr_weather_atlantic_mists
		}
		30 = { # Fair
			set_variable = { which = cr_weather_winter value = 1 } # cr_weather_atlantic_rains
			set_variable = { which = cr_weather_spring value = 4 } # cr_weather_atlantic_bright_season
			set_variable = { which = cr_weather_summer value = 4 } # cr_weather_atlantic_bright_season
			set_variable = { which = cr_weather_autumn value = 4 } # cr_weather_atlantic_bright_season
		}
	}
}

cr_apply_scotland_weather_effect = {
	random_list = {
		30 = { # Wet
			set_variable = { which = cr_weather_winter value = 6 } # cr_weather_scottish_gales
			set_variable = { which = cr_weather_spring value = 5 } # cr_weather_scottish_rains
			set_variable = { which = cr_weather_summer value = 8 } # cr_weather_scottish_clear_season
			set_variable = { which = cr_weather_autumn value = 5 } # cr_weather_scottish_rains
		}
		25 = { # Windy
			set_variable = { which = cr_weather_winter value = 6 } # cr_weather_scottish_gales
			set_variable = { which = cr_weather_spring value = 6 } # cr_weather_scottish_gales
			set_variable = { which = cr_weather_summer value = 5 } # cr_weather_scottish_rains
			set_variable = { which = cr_weather_autumn value = 6 } # cr_weather_scottish_gales
		}
		25 = { # Cold
			set_variable = { which = cr_weather_winter value = 7 } # cr_weather_scottish_cold
			set_variable = { which = cr_weather_spring value = 5 } # cr_weather_scottish_rains
			set_variable = { which = cr_weather_summer value = 8 } # cr_weather_scottish_clear_season
			set_variable = { which = cr_weather_autumn value = 7 } # cr_weather_scottish_cold
		}
		20 = { # Fair
			set_variable = { which = cr_weather_winter value = 5 } # cr_weather_scottish_rains
			set_variable = { which = cr_weather_spring value = 8 } # cr_weather_scottish_clear_season
			set_variable = { which = cr_weather_summer value = 8 } # cr_weather_scottish_clear_season
			set_variable = { which = cr_weather_autumn value = 8 } # cr_weather_scottish_clear_season
		}
	}
}

cr_apply_iceland_weather_effect = {
	random_list = {
		35 = { # Hard winter
			set_variable = { which = cr_weather_winter value = 9 } # cr_weather_iceland_hard_winter
			set_variable = { which = cr_weather_spring value = 11 } # cr_weather_iceland_thaw
			set_variable = { which = cr_weather_summer value = 12 } # cr_weather_iceland_clear_season
			set_variable = { which = cr_weather_autumn value = 10 } # cr_weather_iceland_gales
		}
		30 = { # Windy
			set_variable = { which = cr_weather_winter value = 10 } # cr_weather_iceland_gales
			set_variable = { which = cr_weather_spring value = 11 } # cr_weather_iceland_thaw
			set_variable = { which = cr_weather_summer value = 10 } # cr_weather_iceland_gales
			set_variable = { which = cr_weather_autumn value = 10 } # cr_weather_iceland_gales
		}
		20 = { # Strong thaw
			set_variable = { which = cr_weather_winter value = 9 } # cr_weather_iceland_hard_winter
			set_variable = { which = cr_weather_spring value = 11 } # cr_weather_iceland_thaw
			set_variable = { which = cr_weather_summer value = 12 } # cr_weather_iceland_clear_season
			set_variable = { which = cr_weather_autumn value = 12 } # cr_weather_iceland_clear_season
		}
		15 = { # Mild
			set_variable = { which = cr_weather_winter value = 10 } # cr_weather_iceland_gales
			set_variable = { which = cr_weather_spring value = 11 } # cr_weather_iceland_thaw
			set_variable = { which = cr_weather_summer value = 12 } # cr_weather_iceland_clear_season
			set_variable = { which = cr_weather_autumn value = 12 } # cr_weather_iceland_clear_season
		}
	}
}

cr_apply_northern_maritime_weather_effect = {
	random_list = {
		35 = { # Wet
			set_variable = { which = cr_weather_winter value = 15 } # cr_weather_northern_maritime_cold
			set_variable = { which = cr_weather_spring value = 13 } # cr_weather_northern_maritime_rains
			set_variable = { which = cr_weather_summer value = 16 } # cr_weather_northern_maritime_bright_season
			set_variable = { which = cr_weather_autumn value = 13 } # cr_weather_northern_maritime_rains
		}
		25 = { # Windy
			set_variable = { which = cr_weather_winter value = 14 } # cr_weather_northern_maritime_gales
			set_variable = { which = cr_weather_spring value = 13 } # cr_weather_northern_maritime_rains
			set_variable = { which = cr_weather_summer value = 14 } # cr_weather_northern_maritime_gales
			set_variable = { which = cr_weather_autumn value = 14 } # cr_weather_northern_maritime_gales
		}
		20 = { # Cold
			set_variable = { which = cr_weather_winter value = 15 } # cr_weather_northern_maritime_cold
			set_variable = { which = cr_weather_spring value = 15 } # cr_weather_northern_maritime_cold
			set_variable = { which = cr_weather_summer value = 16 } # cr_weather_northern_maritime_bright_season
			set_variable = { which = cr_weather_autumn value = 13 } # cr_weather_northern_maritime_rains
		}
		20 = { # Fair
			set_variable = { which = cr_weather_winter value = 15 } # cr_weather_northern_maritime_cold
			set_variable = { which = cr_weather_spring value = 16 } # cr_weather_northern_maritime_bright_season
			set_variable = { which = cr_weather_summer value = 16 } # cr_weather_northern_maritime_bright_season
			set_variable = { which = cr_weather_autumn value = 16 } # cr_weather_northern_maritime_bright_season
		}
	}
}

cr_apply_boreal_weather_effect = {
	random_list = {
		35 = { # Snowy
			set_variable = { which = cr_weather_winter value = 17 } # cr_weather_boreal_snow
			set_variable = { which = cr_weather_spring value = 19 } # cr_weather_boreal_thaw
			set_variable = { which = cr_weather_summer value = 20 } # cr_weather_boreal_clear_season
			set_variable = { which = cr_weather_autumn value = 18 } # cr_weather_boreal_rains
		}
		25 = { # Wet
			set_variable = { which = cr_weather_winter value = 17 } # cr_weather_boreal_snow
			set_variable = { which = cr_weather_spring value = 18 } # cr_weather_boreal_rains
			set_variable = { which = cr_weather_summer value = 18 } # cr_weather_boreal_rains
			set_variable = { which = cr_weather_autumn value = 18 } # cr_weather_boreal_rains
		}
		20 = { # Strong thaw
			set_variable = { which = cr_weather_winter value = 17 } # cr_weather_boreal_snow
			set_variable = { which = cr_weather_spring value = 19 } # cr_weather_boreal_thaw
			set_variable = { which = cr_weather_summer value = 20 } # cr_weather_boreal_clear_season
			set_variable = { which = cr_weather_autumn value = 20 } # cr_weather_boreal_clear_season
		}
		20 = { # Fair
			set_variable = { which = cr_weather_winter value = 17 } # cr_weather_boreal_snow
			set_variable = { which = cr_weather_spring value = 20 } # cr_weather_boreal_clear_season
			set_variable = { which = cr_weather_summer value = 20 } # cr_weather_boreal_clear_season
			set_variable = { which = cr_weather_autumn value = 20 } # cr_weather_boreal_clear_season
		}
	}
}

cr_apply_western_oceanic_weather_effect = {
	random_list = {
		35 = { # Wet
			set_variable = { which = cr_weather_winter value = 21 } # cr_weather_temperate_rains
			set_variable = { which = cr_weather_spring value = 21 } # cr_weather_temperate_rains
			set_variable = { which = cr_weather_summer value = 24 } # cr_weather_temperate_fair_season
			set_variable = { which = cr_weather_autumn value = 21 } # cr_weather_temperate_rains
		}
		15 = { # Stormy
			set_variable = { which = cr_weather_winter value = 22 } # cr_weather_temperate_storms
			set_variable = { which = cr_weather_spring value = 21 } # cr_weather_temperate_rains
			set_variable = { which = cr_weather_summer value = 22 } # cr_weather_temperate_storms
			set_variable = { which = cr_weather_autumn value = 3 } # cr_weather_atlantic_mists
		}
		20 = { # Misty
			set_variable = { which = cr_weather_winter value = 3 } # cr_weather_atlantic_mists
			set_variable = { which = cr_weather_spring value = 21 } # cr_weather_temperate_rains
			set_variable = { which = cr_weather_summer value = 24 } # cr_weather_temperate_fair_season
			set_variable = { which = cr_weather_autumn value = 3 } # cr_weather_atlantic_mists
		}
		30 = { # Fair
			set_variable = { which = cr_weather_winter value = 21 } # cr_weather_temperate_rains
			set_variable = { which = cr_weather_spring value = 24 } # cr_weather_temperate_fair_season
			set_variable = { which = cr_weather_summer value = 24 } # cr_weather_temperate_fair_season
			set_variable = { which = cr_weather_autumn value = 24 } # cr_weather_temperate_fair_season
		}
	}
}

cr_apply_temperate_weather_effect = {
	random_list = {
		35 = { # Fair
			set_variable = { which = cr_weather_winter value = 23 } # cr_weather_temperate_cold_snap
			set_variable = { which = cr_weather_spring value = 24 } # cr_weather_temperate_fair_season
			set_variable = { which = cr_weather_summer value = 24 } # cr_weather_temperate_fair_season
			set_variable = { which = cr_weather_autumn value = 24 } # cr_weather_temperate_fair_season
		}
		30 = { # Wet
			set_variable = { which = cr_weather_winter value = 21 } # cr_weather_temperate_rains
			set_variable = { which = cr_weather_spring value = 21 } # cr_weather_temperate_rains
			set_variable = { which = cr_weather_summer value = 24 } # cr_weather_temperate_fair_season
			set_variable = { which = cr_weather_autumn value = 21 } # cr_weather_temperate_rains
		}
		20 = { # Stormy
			set_variable = { which = cr_weather_winter value = 22 } # cr_weather_temperate_storms
			set_variable = { which = cr_weather_spring value = 21 } # cr_weather_temperate_rains
			set_variable = { which = cr_weather_summer value = 22 } # cr_weather_temperate_storms
			set_variable = { which = cr_weather_autumn value = 21 } # cr_weather_temperate_rains
		}
		15 = { # Cold
			set_variable = { which = cr_weather_winter value = 23 } # cr_weather_temperate_cold_snap
			set_variable = { which = cr_weather_spring value = 23 } # cr_weather_temperate_cold_snap
			set_variable = { which = cr_weather_summer value = 24 } # cr_weather_temperate_fair_season
			set_variable = { which = cr_weather_autumn value = 23 } # cr_weather_temperate_cold_snap
		}
	}
}

cr_apply_mediterranean_weather_effect = {
	random_list = {
		40 = { # Fair
			set_variable = { which = cr_weather_winter value = 26 } # cr_weather_mediterranean_winter_rains
			set_variable = { which = cr_weather_spring value = 28 } # cr_weather_mediterranean_fair_season
			set_variable = { which = cr_weather_summer value = 25 } # cr_weather_mediterranean_summer_heat
			set_variable = { which = cr_weather_autumn value = 28 } # cr_weather_mediterranean_fair_season
		}
		25 = { # Wet
			set_variable = { which = cr_weather_winter value = 26 } # cr_weather_mediterranean_winter_rains
			set_variable = { which = cr_weather_spring value = 26 } # cr_weather_mediterranean_winter_rains
			set_variable = { which = cr_weather_summer value = 28 } # cr_weather_mediterranean_fair_season
			set_variable = { which = cr_weather_autumn value = 26 } # cr_weather_mediterranean_winter_rains
		}
		20 = { # Hot
			set_variable = { which = cr_weather_winter value = 28 } # cr_weather_mediterranean_fair_season
			set_variable = { which = cr_weather_spring value = 28 } # cr_weather_mediterranean_fair_season
			set_variable = { which = cr_weather_summer value = 25 } # cr_weather_mediterranean_summer_heat
			set_variable = { which = cr_weather_autumn value = 25 } # cr_weather_mediterranean_summer_heat
		}
		15 = { # Stormy
			set_variable = { which = cr_weather_winter value = 27 } # cr_weather_mediterranean_storms
			set_variable = { which = cr_weather_spring value = 26 } # cr_weather_mediterranean_winter_rains
			set_variable = { which = cr_weather_summer value = 28 } # cr_weather_mediterranean_fair_season
			set_variable = { which = cr_weather_autumn value = 27 } # cr_weather_mediterranean_storms
		}
	}
}

cr_apply_iberian_weather_effect = {
	random_list = {
		35 = { # Fair
			set_variable = { which = cr_weather_winter value = 30 } # cr_weather_iberian_rains
			set_variable = { which = cr_weather_spring value = 32 } # cr_weather_iberian_good_season
			set_variable = { which = cr_weather_summer value = 32 } # cr_weather_iberian_good_season
			set_variable = { which = cr_weather_autumn value = 32 } # cr_weather_iberian_good_season
		}
		30 = { # Hot
			set_variable = { which = cr_weather_winter value = 30 } # cr_weather_iberian_rains
			set_variable = { which = cr_weather_spring value = 32 } # cr_weather_iberian_good_season
			set_variable = { which = cr_weather_summer value = 29 } # cr_weather_iberian_dry_heat
			set_variable = { which = cr_weather_autumn value = 29 } # cr_weather_iberian_dry_heat
		}
		20 = { # Wet
			set_variable = { which = cr_weather_winter value = 30 } # cr_weather_iberian_rains
			set_variable = { which = cr_weather_spring value = 30 } # cr_weather_iberian_rains
			set_variable = { which = cr_weather_summer value = 29 } # cr_weather_iberian_dry_heat
			set_variable = { which = cr_weather_autumn value = 30 } # cr_weather_iberian_rains
		}
		15 = { # Drought
			set_variable = { which = cr_weather_winter value = 32 } # cr_weather_iberian_good_season
			set_variable = { which = cr_weather_spring value = 29 } # cr_weather_iberian_dry_heat
			set_variable = { which = cr_weather_summer value = 31 } # cr_weather_iberian_drought
			set_variable = { which = cr_weather_autumn value = 31 } # cr_weather_iberian_drought
		}
	}
}

cr_apply_highland_weather_effect = {
	random_list = {
		30 = { # Fair
			set_variable = { which = cr_weather_winter value = 33 } # cr_weather_highland_snow
			set_variable = { which = cr_weather_spring value = 36 } # cr_weather_highland_clear_season
			set_variable = { which = cr_weather_summer value = 36 } # cr_weather_highland_clear_season
			set_variable = { which = cr_weather_autumn value = 36 } # cr_weather_highland_clear_season
		}
		25 = { # Snowy
			set_variable = { which = cr_weather_winter value = 33 } # cr_weather_highland_snow
			set_variable = { which = cr_weather_spring value = 33 } # cr_weather_highland_snow
			set_variable = { which = cr_weather_summer value = 36 } # cr_weather_highland_clear_season
			set_variable = { which = cr_weather_autumn value = 34 } # cr_weather_highland_storms
		}
		25 = { # Stormy
			set_variable = { which = cr_weather_winter value = 33 } # cr_weather_highland_snow
			set_variable = { which = cr_weather_spring value = 34 } # cr_weather_highland_storms
			set_variable = { which = cr_weather_summer value = 34 } # cr_weather_highland_storms
			set_variable = { which = cr_weather_autumn value = 34 } # cr_weather_highland_storms
		}
		20 = { # Dry
			set_variable = { which = cr_weather_winter value = 33 } # cr_weather_highland_snow
			set_variable = { which = cr_weather_spring value = 36 } # cr_weather_highland_clear_season
			set_variable = { which = cr_weather_summer value = 35 } # cr_weather_highland_dry_season
			set_variable = { which = cr_weather_autumn value = 35 } # cr_weather_highland_dry_season
		}
	}
}

cr_apply_desert_weather_effect = {
	random_list = {
		35 = { # Hot
			set_variable = { which = cr_weather_winter value = 40 } # cr_weather_desert_clear_season
			set_variable = { which = cr_weather_spring value = 40 } # cr_weather_desert_clear_season
			set_variable = { which = cr_weather_summer value = 37 } # cr_weather_desert_heat
			set_variable = { which = cr_weather_autumn value = 37 } # cr_weather_desert_heat
		}
		25 = { # Clear
			set_variable = { which = cr_weather_winter value = 39 } # cr_weather_desert_rains
			set_variable = { which = cr_weather_spring value = 40 } # cr_weather_desert_clear_season
			set_variable = { which = cr_weather_summer value = 37 } # cr_weather_desert_heat
			set_variable = { which = cr_weather_autumn value = 40 } # cr_weather_desert_clear_season
		}
		20 = { # Dusty
			set_variable = { which = cr_weather_winter value = 40 } # cr_weather_desert_clear_season
			set_variable = { which = cr_weather_spring value = 38 } # cr_weather_desert_sandstorms
			set_variable = { which = cr_weather_summer value = 37 } # cr_weather_desert_heat
			set_variable = { which = cr_weather_autumn value = 38 } # cr_weather_desert_sandstorms
		}
		20 = { # Wet
			set_variable = { which = cr_weather_winter value = 39 } # cr_weather_desert_rains
			set_variable = { which = cr_weather_spring value = 39 } # cr_weather_desert_rains
			set_variable = { which = cr_weather_summer value = 40 } # cr_weather_desert_clear_season
			set_variable = { which = cr_weather_autumn value = 39 } # cr_weather_desert_rains
		}
	}
}

cr_apply_sahel_africa_weather_effect = {
	random_list = {
		35 = { # Dry
			set_variable = { which = cr_weather_winter value = 42 } # cr_weather_sahel_dry_season
			set_variable = { which = cr_weather_spring value = 42 } # cr_weather_sahel_dry_season
			set_variable = { which = cr_weather_summer value = 41 } # cr_weather_sahel_wet_season
			set_variable = { which = cr_weather_autumn value = 42 } # cr_weather_sahel_dry_season
		}
		30 = { # Wet
			set_variable = { which = cr_weather_winter value = 42 } # cr_weather_sahel_dry_season
			set_variable = { which = cr_weather_spring value = 44 } # cr_weather_sahel_good_season
			set_variable = { which = cr_weather_summer value = 41 } # cr_weather_sahel_wet_season
			set_variable = { which = cr_weather_autumn value = 41 } # cr_weather_sahel_wet_season
		}
		20 = { # Good harvest
			set_variable = { which = cr_weather_winter value = 42 } # cr_weather_sahel_dry_season
			set_variable = { which = cr_weather_spring value = 44 } # cr_weather_sahel_good_season
			set_variable = { which = cr_weather_summer value = 41 } # cr_weather_sahel_wet_season
			set_variable = { which = cr_weather_autumn value = 44 } # cr_weather_sahel_good_season
		}
		15 = { # Failed rains
			set_variable = { which = cr_weather_winter value = 42 } # cr_weather_sahel_dry_season
			set_variable = { which = cr_weather_spring value = 42 } # cr_weather_sahel_dry_season
			set_variable = { which = cr_weather_summer value = 43 } # cr_weather_sahel_drought
			set_variable = { which = cr_weather_autumn value = 43 } # cr_weather_sahel_drought
		}
	}
}

cr_apply_steppe_weather_effect = {
	random_list = {
		35 = { # Good pasture
			set_variable = { which = cr_weather_winter value = 46 } # cr_weather_steppe_snow
			set_variable = { which = cr_weather_spring value = 48 } # cr_weather_steppe_grazing_season
			set_variable = { which = cr_weather_summer value = 48 } # cr_weather_steppe_grazing_season
			set_variable = { which = cr_weather_autumn value = 48 } # cr_weather_steppe_grazing_season
		}
		25 = { # Windy
			set_variable = { which = cr_weather_winter value = 46 } # cr_weather_steppe_snow
			set_variable = { which = cr_weather_spring value = 45 } # cr_weather_steppe_winds
			set_variable = { which = cr_weather_summer value = 45 } # cr_weather_steppe_winds
			set_variable = { which = cr_weather_autumn value = 45 } # cr_weather_steppe_winds
		}
		20 = { # Snowy
			set_variable = { which = cr_weather_winter value = 46 } # cr_weather_steppe_snow
			set_variable = { which = cr_weather_spring value = 45 } # cr_weather_steppe_winds
			set_variable = { which = cr_weather_summer value = 48 } # cr_weather_steppe_grazing_season
			set_variable = { which = cr_weather_autumn value = 46 } # cr_weather_steppe_snow
		}
		20 = { # Drought
			set_variable = { which = cr_weather_winter value = 46 } # cr_weather_steppe_snow
			set_variable = { which = cr_weather_spring value = 45 } # cr_weather_steppe_winds
			set_variable = { which = cr_weather_summer value = 47 } # cr_weather_steppe_drought
			set_variable = { which = cr_weather_autumn value = 47 } # cr_weather_steppe_drought
		}
	}
}

cr_apply_persian_plateau_weather_effect = {
	random_list = {
		35 = { # Hot
			set_variable = { which = cr_weather_winter value = 50 } # cr_weather_plateau_winter
			set_variable = { which = cr_weather_spring value = 51 } # cr_weather_plateau_spring
			set_variable = { which = cr_weather_summer value = 49 } # cr_weather_plateau_dry_heat
			set_variable = { which = cr_weather_autumn value = 49 } # cr_weather_plateau_dry_heat
		}
		30 = { # Good growing seasons
			set_variable = { which = cr_weather_winter value = 50 } # cr_weather_plateau_winter
			set_variable = { which = cr_weather_spring value = 51 } # cr_weather_plateau_spring
			set_variable = { which = cr_weather_summer value = 49 } # cr_weather_plateau_dry_heat
			set_variable = { which = cr_weather_autumn value = 51 } # cr_weather_plateau_spring
		}
		20 = { # Cold
			set_variable = { which = cr_weather_winter value = 50 } # cr_weather_plateau_winter
			set_variable = { which = cr_weather_spring value = 50 } # cr_weather_plateau_winter
			set_variable = { which = cr_weather_summer value = 51 } # cr_weather_plateau_spring
			set_variable = { which = cr_weather_autumn value = 52 } # cr_weather_plateau_dust
		}
		15 = { # Dusty
			set_variable = { which = cr_weather_winter value = 50 } # cr_weather_plateau_winter
			set_variable = { which = cr_weather_spring value = 52 } # cr_weather_plateau_dust
			set_variable = { which = cr_weather_summer value = 49 } # cr_weather_plateau_dry_heat
			set_variable = { which = cr_weather_autumn value = 52 } # cr_weather_plateau_dust
		}
	}
}

cr_apply_indian_monsoon_weather_effect = {
	random_list = {
		35 = { # Wet
			set_variable = { which = cr_weather_winter value = 56 } # cr_weather_indian_good_harvest
			set_variable = { which = cr_weather_spring value = 55 } # cr_weather_indian_dry_heat
			set_variable = { which = cr_weather_summer value = 53 } # cr_weather_indian_monsoon
			set_variable = { which = cr_weather_autumn value = 53 } # cr_weather_indian_monsoon
		}
		30 = { # Good harvest
			set_variable = { which = cr_weather_winter value = 56 } # cr_weather_indian_good_harvest
			set_variable = { which = cr_weather_spring value = 56 } # cr_weather_indian_good_harvest
			set_variable = { which = cr_weather_summer value = 53 } # cr_weather_indian_monsoon
			set_variable = { which = cr_weather_autumn value = 56 } # cr_weather_indian_good_harvest
		}
		20 = { # Weak monsoon
			set_variable = { which = cr_weather_winter value = 56 } # cr_weather_indian_good_harvest
			set_variable = { which = cr_weather_spring value = 55 } # cr_weather_indian_dry_heat
			set_variable = { which = cr_weather_summer value = 55 } # cr_weather_indian_dry_heat
			set_variable = { which = cr_weather_autumn value = 56 } # cr_weather_indian_good_harvest
		}
		15 = { # Floods
			set_variable = { which = cr_weather_winter value = 56 } # cr_weather_indian_good_harvest
			set_variable = { which = cr_weather_spring value = 55 } # cr_weather_indian_dry_heat
			set_variable = { which = cr_weather_summer value = 54 } # cr_weather_indian_floods
			set_variable = { which = cr_weather_autumn value = 53 } # cr_weather_indian_monsoon
		}
	}
}

cr_apply_himalayan_tibetan_weather_effect = {
	random_list = {
		35 = { # Snowy
			set_variable = { which = cr_weather_winter value = 57 } # cr_weather_himalayan_snow
			set_variable = { which = cr_weather_spring value = 60 } # cr_weather_himalayan_cold
			set_variable = { which = cr_weather_summer value = 59 } # cr_weather_himalayan_clear_season
			set_variable = { which = cr_weather_autumn value = 57 } # cr_weather_himalayan_snow
		}
		25 = { # Fair
			set_variable = { which = cr_weather_winter value = 60 } # cr_weather_himalayan_cold
			set_variable = { which = cr_weather_spring value = 59 } # cr_weather_himalayan_clear_season
			set_variable = { which = cr_weather_summer value = 58 } # cr_weather_himalayan_monsoon
			set_variable = { which = cr_weather_autumn value = 59 } # cr_weather_himalayan_clear_season
		}
		25 = { # Wet
			set_variable = { which = cr_weather_winter value = 57 } # cr_weather_himalayan_snow
			set_variable = { which = cr_weather_spring value = 59 } # cr_weather_himalayan_clear_season
			set_variable = { which = cr_weather_summer value = 58 } # cr_weather_himalayan_monsoon
			set_variable = { which = cr_weather_autumn value = 58 } # cr_weather_himalayan_monsoon
		}
		15 = { # Cold
			set_variable = { which = cr_weather_winter value = 60 } # cr_weather_himalayan_cold
			set_variable = { which = cr_weather_spring value = 60 } # cr_weather_himalayan_cold
			set_variable = { which = cr_weather_summer value = 59 } # cr_weather_himalayan_clear_season
			set_variable = { which = cr_weather_autumn value = 60 } # cr_weather_himalayan_cold
		}
	}
}

cr_apply_east_asian_weather_effect = {
	random_list = {
		35 = { # Fair
			set_variable = { which = cr_weather_winter value = 63 } # cr_weather_east_asian_winter
			set_variable = { which = cr_weather_spring value = 64 } # cr_weather_east_asian_clear_season
			set_variable = { which = cr_weather_summer value = 61 } # cr_weather_east_asian_monsoon
			set_variable = { which = cr_weather_autumn value = 64 } # cr_weather_east_asian_clear_season
		}
		30 = { # Wet
			set_variable = { which = cr_weather_winter value = 63 } # cr_weather_east_asian_winter
			set_variable = { which = cr_weather_spring value = 61 } # cr_weather_east_asian_monsoon
			set_variable = { which = cr_weather_summer value = 61 } # cr_weather_east_asian_monsoon
			set_variable = { which = cr_weather_autumn value = 64 } # cr_weather_east_asian_clear_season
		}
		20 = { # Cold
			set_variable = { which = cr_weather_winter value = 63 } # cr_weather_east_asian_winter
			set_variable = { which = cr_weather_spring value = 63 } # cr_weather_east_asian_winter
			set_variable = { which = cr_weather_summer value = 64 } # cr_weather_east_asian_clear_season
			set_variable = { which = cr_weather_autumn value = 63 } # cr_weather_east_asian_winter
		}
		15 = { # Stormy
			set_variable = { which = cr_weather_winter value = 63 } # cr_weather_east_asian_winter
			set_variable = { which = cr_weather_spring value = 61 } # cr_weather_east_asian_monsoon
			set_variable = { which = cr_weather_summer value = 62 } # cr_weather_east_asian_storms
			set_variable = { which = cr_weather_autumn value = 62 } # cr_weather_east_asian_storms
		}
	}
}
